<?php

namespace app\validate;

use think\Validate;

class Index extends Validate
{
    protected $rule = [
        'mobile' => 'require|number|mobile',
        'password' => 'require',
        'id' => 'require'
    ];
    protected $message = [
        'mobile.require' => '手机号必填',
        'mobile.number' => '手机号为纯数字',
        'mobile.mobile' => '不是有效手机号',
        'password.require' => '密码必填',
        'id.require' => '用户id必填'
    ];
    protected $scene = [
        'login' => ['mobile', 'password'],
        'register' => ['mobile', 'password'],
        'search' => ['id']
    ];
}